package com.bj58.mis.apm.server.statistics.dto.cube;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@ApiModel(description = "Cube维度")
@Data
public class CubeDimensions {

    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "表名")
    private String table;
    @ApiModelProperty(value = "字段")
    private String column;
    @ApiModelProperty(value = "衍生")
    private List<String> derived;

    @ApiModelProperty(value = "类型 - normal:普通，derived:衍生")
    public String getType() {
        return derived != null && derived.size() > 0 ? "derived" : "normal";
    }

}
